#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main(){
    int H,W; cin >> H >> W;
    vector<string> g(H);
    for(string& str : g){
        cin >> str;
    }
    int N = min(H,W);
    vector<int> ans(N + 1, 0);
    for(int i = 0; i < H; ++i){
        for(int j = 0; j < W; ++j){
            if(g[i][j] != '#') continue;
            int k = 0;
            while(true){
                bool ok = true;
                int d = k + 1;
                int dx[4] = {d,d,-d,-d};
                int dy[4] = {d,-d,d,-d};
                for(int m = 0; m < 4; ++m){
                    int ni = i + dx[m], nj = j + dy[m];
                    if(ni < 0 || nj < 0 || ni >= H || nj >= W || g[ni][nj] == '.'){
                        ok = false; break;
                    }
                }
                if(ok){
                    k++;
                    if(k == N) break;
                } 
                else break;
            }
            if(k >= 1) ans[k]++;
        }
    }
    for(int n = 1; n <= N; ++n) cout << ans[n] << ' ';
    return 0;
}